package com.efast.dmom.mgmt.controller.les;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.entity.les.TwInboundAllocDetail;
import com.efast.dmom.mgmt.service.les.TwInboundAllocDetailService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;


/**
 * @author chlp
 */
@Controller
@RequestMapping(value = "/twInboundAllocDetail")
@Api(description = "分配记录")
public class TwInboundAllocDetailController {

	private final TwInboundAllocDetailService twInboundAllocDetailService;

	@Autowired
	public TwInboundAllocDetailController(TwInboundAllocDetailService twInboundAllocDetailService) {
		this.twInboundAllocDetailService = twInboundAllocDetailService;
	}

	/**
	 * 
	 * @Title: distribution
	 * @Description: 分配上架库位
	 * @param @param twDocAsnHeader
	 * @param @return    参数
	 * @return ResultBean    返回类型
	 */
	@ApiOperation(value = "【分配上架库位】",notes = "请求参数：")
	@RequestMapping(value = "/distribution", method = RequestMethod.POST)
	public @ResponseBody ResultBean distribution(@RequestBody TwInboundAllocDetail twInboundAllocDetail) {
		ResultBean result = new ResultBean(true, "'");
		twInboundAllocDetailService.updateNonEmptyTwInboundAllocDetailById(twInboundAllocDetail);
		return result;
	}

}
